package pojo;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 表示DVD实体类
 */
public class DVD {

    private String name; //dvd名称
    private int state; //当前dvd状态   0表示已借出   1表示未借出
    private LocalDate date; //借出日期
    private long count; //借出次数
    private double rent; //租金

    public DVD(String name, int state, LocalDate date, long count, double rent) {
        this.name = name;
        this.state = state;
        this.date = date;
        this.count = count;
        this.rent = rent;
    }

    public DVD(String name, int state, LocalDate date, long count) {
        this.name = name;
        this.state = state;
        this.date = date;
        this.count = count;
    }

    public DVD() {
    }

    public DVD(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public LocalDate getDate() {
        return date;
    }

    public void setDate(LocalDate date) {
        this.date = date;
    }

    public long getCount() {
        return count;
    }

    public void setCount(long count) {
        this.count = count;
    }

    public void setRent(double rent) {
        this.rent = rent;
    }

    public double getRent() {
        return rent;
    }

    @Override
    public String toString() {
        return "DVD{" +
                "name='" + name + '\'' +
                ", state=" + state +
                ", date=" + date +
                ", count=" + count +
                ", rent=" + rent +
                '}';
    }

    public static void main(String[] args) {
        System.out.println("序号\t状态  \t名称\t     借出日期\t 借出次数\t");
        System.out.println("1\t已借出\t罗马假日\t" + LocalDate.now() + "\t  20");

    }

}
